import instance from "@/axios";

// 角色列表     /role/list?id=1   queryString       delete  get
export const roleList = ()=>instance.get("/role/list")


// 角色分页  post  put  json
export const rolePage = (searchParams)=>instance.post("/role/page",searchParams)

// 添加角色信息
export const addRole = (form)=>instance.post("/role/add",form)

// 编辑角色信息
export const editRole = (form)=>instance.put("/role/edit",form)

// 删除角色
export const deleteRole = (rid)=>instance.delete("/role/delete/"+rid)

// 获取角色权限   rid
export const getRolePermission = (rid)=>instance.get("/role/rolePermissions/"+rid)

// 修改角色权限
export const editRolePermissions = (rolePermissions) =>instance.put("/role/editRolePermissions",rolePermissions)




